﻿namespace PropOnline.ViewModels.Shared
{
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using PropOnline.Models;
    using PropOnline.Models.Validation;
    using PropOnline.Properties;
   
    public class BusquedaBarrioCalleMapaViewModel : BusquedaViewModelBase
    {
        public IList<BarrioOption> BarriosOptions { get; set; }

        [RequiredOnOtherPropertyValue(otherPropertyName : "TipoBusqueda", otherPropertyValue : "1", ErrorMessageResourceType = typeof(Resources), ErrorMessageResourceName = "CalleRequired")]
        [StringLength(50, MinimumLength = 2, ErrorMessageResourceType = typeof(Resources), ErrorMessageResourceName = "CalleStringLenght")]
        public string Calle { get; set; }
        
        [Range(0, 99999, ErrorMessageResourceType = typeof(Resources), ErrorMessageResourceName = "AlturaRange")]
        public int? AlturaMin { get; set; }
        
        [Range(0, 99999, ErrorMessageResourceType = typeof(Resources), ErrorMessageResourceName = "AlturaRange")]
        public int? AlturaMax { get; set; }
        
        public int? TipoBusqueda { get; set; }

        [Range(0, 999999, ErrorMessageResourceType = typeof(Resources), ErrorMessageResourceName = "SuperficieRange")]
        public int? Superficie { get; set; }
                
        public IEnumerable<int> Ambientes { get; set; }

        public int? MesesEnMercado { get; set; }

        [EnumDataType(typeof(Moneda))]
        public Moneda? Moneda { get; set; }

        public int? PrecioMin { get; set; }

        public int? PrecioMax { get; set; }

        public int? CantidadResultados { get; set; }
    }
}